package com.cloudbroker.bcs.platform.ltb.bizapi.service.base.vo;

import com.cloudbroker.bcs.common.validatioin.annotation.IntegerString;
import com.cloudbroker.bcs.common.validatioin.annotation.Length;
import com.cloudbroker.bcs.common.validatioin.annotation.Range;

public class PageVO extends HSLTBBaseVO {
    
    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1L;

    protected String sort_field;

    protected String sort_type;
    @Range(min = 1,max = 10000)
    protected Integer page_no = 1;
    @Range(min = 1 ,max = 10000)
    protected Integer request_num = 10;

    protected Long position_str;

    protected Integer start_row = (page_no-1) * request_num ;

    public String getSort_field() {
        return sort_field;
    }
    
    public void setSort_field(String sort_field) {
        this.sort_field = sort_field;
    }
    
    public String getSort_type() {
        return sort_type;
    }
    
    public void setSort_type(String sort_type) {
        this.sort_type = sort_type;
    }

    public Integer getPage_no() {
        return page_no;
    }

    public void setPage_no(Integer page_no) {
        this.page_no = page_no;
    }

    public Integer getRequest_num() {
        return request_num;
    }

    public void setRequest_num(Integer request_num) {
        this.request_num = request_num;
    }

    public Integer getStart_row() {
        start_row = (page_no-1)*request_num;
        return start_row;
    }

    public void setStart_row(int start_row) {
        this.start_row = start_row;
    }

    public Long getPosition_str() {
        return position_str;
    }

    public void setPosition_str(Long position_str) {
        this.position_str = position_str;
    }

    @Override
    public String toString() {
        return "PageVO{" +
                "sort_field='" + sort_field + '\'' +
                ", sort_type='" + sort_type + '\'' +
                ", page_no='" + page_no + '\'' +
                ", request_num='" + request_num + '\'' +
                '}';
    }
}
